package com.onlinevideo.service.impl;

import com.onlinevideo.dao.RoleDao;
import com.onlinevideo.dao.impl.RoleDaoImpl;
import com.onlinevideo.entity.Role;
import com.onlinevideo.service.RoleService;

import java.util.List;

public class RoleServiceImpl implements RoleService {

    private RoleDao roleDao = new RoleDaoImpl();

    @Override
    public int insert(Role role) {
        return roleDao.insert(role);
    }

    @Override
    public int delete(Long id) {
        return roleDao.delete(id);
    }

    @Override
    public int update(Role role) {
        return roleDao.update(role);
    }

    @Override
    public Role queryById(Long id) {
        return roleDao.queryById(id);
    }

    @Override
    public List<Role> queryAll() {
        return roleDao.queryAll();
    }
}
